#字典操作1
dict1 = {"boss":'王晶晶','Teacher':'张江','banzhang':'娄艺潇'}

#字典内涵
res = {key+'★':value+"☆" for key,value in dict1.items()}
#{'boss★': '王晶晶☆', 'Teacher★': '张江☆', 'banzhang★': '娄艺潇☆'}




#查看key长度为 4的键
res = {key:value+"☆" for key,value in dict1.items() if len(key)==4}



#多个循环
dic1 = {'ET':'外星人',"UFO":'飞碟','CJ_Seven':'长江7号'}
dic2 = {'Mws':'山哥',"HJ":'宏姐','Yxc':'小春老师'}


# 键+键:值+值
res = {i+x : j+y for i,j in dic1.items() for x,y in dic2.items()}

#{'ETMws': '外星人山哥', 'ETHJ': '外星人宏姐', 'ETYxc': '外星人小春老师', 'UFOMws': '飞碟山哥', 'UFOHJ': '飞碟宏姐', 'UFOYxc': '飞碟小春老师', 'CJ_SevenMws': '长江7号山哥', 'CJ_SevenHJ': '长江7号宏姐', 'CJ_SevenYxc': '长江7号小春老师'}



#带条件(用长度来进行判断)
res = {i+x : j+y for i,j in dic1.items() for x,y in dic2.items() if len(i)==len(x)}


print(res)





